<!--{eval $_TPL['titles'] = array($event['title'], '活动');}-->
<!--{template header}-->

	<h2 class="title">
		<!--{if $_SGLOBAL[refer]}-->
		<div class="r_option">
			<a  href="$_SGLOBAL[refer]">&laquo; 返回上一页</a>
		</div>
		<!--{/if}-->
		<img src="image/app/event.gif"/> <a href="space.php?do=event">活动</a> - <a href="space.php?do=event&id=$event[eventid]">$event[title]</a>
		<!--{if $event[grade]==-2}--><span style="color:#f00"> 已关闭</span>
		<!--{elseif $event[grade]<=0}--><span style="color:#f00"> 待审核</span>
		<!--{/if}-->
	</h2>
	<div class="tabs_header">
		<a href="cp.php?ac=share&type=event&id=$eventid" id="a_share" onclick="ajaxmenu(event, this.id, 1)" class="a_share">分享</a>
		<div class="r_option">
			<!--{if $_SGLOBAL[supe_uid] == $event[uid] || checkperm('manageevent')}-->
			<a href="cp.php?ac=topic&op=join&id=$event[eventid]&idtype=eventid" id="a_topicjoin_$event[eventid]" onclick="ajaxmenu(event, this.id)">凑热闹</a><span class="pipe">|</span>
			<!--{/if}-->
			<!--{if checkperm('manageevent')}-->
			<a href="admincp.php?ac=event&eventid=$event[eventid]" target="_blank">审核管理</a><span class="pipe">|</span>
			<a href="cp.php?ac=event&id=$event[eventid]&op=edithot" id="a_hot_$event[eventid]" onclick="ajaxmenu(event, this.id)">热度</a><span class="pipe">|</span>
			<!--{/if}-->
			<a href="cp.php?ac=common&op=report&idtype=eventid&id=$event[eventid]" id="a_report" onclick="ajaxmenu(event, this.id, 1)">举报</a><span class="pipe">|</span>
		</div>

		<ul class="tabs">
			<li $menu[all]><a href="space.php?do=event&id=$event[eventid]"><span>活动</span></a></li>
            <li $menu[member]><a href="space.php?do=event&id=$event[eventid]&view=member&status=2"><span>成员</span></a></li>
			<li $menu[pic]><a href="space.php?do=event&id=$event[eventid]&view=pic"><span>照片</span></a></li>
			<!--{if $event[tagid]}-->
			<li $menu[thread]><a href="space.php?do=event&id=$event[eventid]&view=thread"><span>话题</span></a></li>
			<!--{/if}-->
			<li $menu[comment]><a href="space.php?do=event&id=$event[eventid]&view=comment"><span>留言</span></a></li>
		</ul>
	</div>

<!--{if $view=="member"}-->

	<div class="sub_menu">
		<div style="width:790px;">
			<form name="searchform" id="searchform" method="get" action="space.php" style=" float: right;">
				<table cellspacing="0" cellpadding="0">
					<tbody>
					<tr>
					<td style="padding: 4px 0 0 0;"><input type="text" style="border-right: medium none; width: 160px;" tabindex="1" class="t_input" onfocus="if(this.value=='搜索成员')this.value='';" value="搜索成员" name="key" id="key"/></td>
					<td style="padding: 4px 0 0 0;"><a href="javascript:$('searchform').submit();" style="padding:0; margin:0;"><img alt="搜索" src="image/search_btn.gif"/></a></td>
					</tr>
					</tbody>
				</table>
				<input type="hidden" name="do" value="event">
				<input type="hidden" name="id" value="$eventid">
				<input type="hidden" name="view" value="member">
				<input type="hidden" name="status" value="$status">
				<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
			</form>
			<a $submenus[member] href="space.php?do=event&id=$event[eventid]&view=member&status=2">$event[membernum] 人参加</a>
			<a $submenus[follow] href="space.php?do=event&id=$event[eventid]&view=member&status=1">$event[follownum] 人关注</a><!--{if $_SGLOBAL[supe_userevent][status] >= 3}-->
			<a $submenus[verify] href="space.php?do=event&id=$event[eventid]&view=member&status=0">$verifynum 人待审核</a><!--{/if}-->
		</div>
	</div>

	<div class="thumb_list">
		<!--{if $members}-->
		<table cellspacing="6" cellpadding="0">
		<!--{loop $members $key $value}-->
			<tr>
				<td class="thumb <!--{if $ols[$value[uid]]}-->online<!--{/if}-->">
					<table cellpadding="4" cellspacing="4">
						<tr>
							<td class="image">
							<div class="ar_r_t"><div class="ar_l_t"><div class="ar_r_b"><div class="ar_l_b">
							<a href="space.php?uid=$value[uid]"><!--{avatar($value[uid],'big')}--></a>
							</div></div></div></div>
							</td>
							<td>
								<h6>
									<a href="space.php?uid=$value[uid]">{$_SN[$value[uid]]}</a>
									<!--{if $ols[$value[uid]]}-->
									<span class="gray online_icon_p" title="当前在线" style="font-size:12px; font-weight:normal;">(<!--{date('H:i',$ols[$value[uid]],1)}-->)</span>
									<!--{/if}-->
								</h6>
								<p class="l_status">
								<!--{if $value['status'] != 1 && $_SGLOBAL[supe_userevent][status]>=3 && $event[uid] != $value[uid]}-->
									<a href="cp.php?ac=event&id=$eventid&op=member&uid=$value[uid]" id="a_mod_$key" onclick="ajaxmenu(event, this.id)" class="r_option" style="padding-left:0.5em;">管理该成员</a>
								<!--{/if}-->
									<span class="r_option gray" id="mtag_member_$value[uid]">
									<!--{if $value[status]==4}-->发起人
									<!--{elseif $value[status]==3}-->组织者
									<!--{elseif $value[status]==2}-->成员
									<!--{elseif $value[status]==0}-->待审核
									<!--{/if}-->
									</span>
									<a href="cp.php?ac=friend&op=add&uid=$value[uid]" id="a_friend_$key" onclick="ajaxmenu(event, this.id, 1)">加为好友</a>
									<span class="pipe">|</span><a href="cp.php?ac=pm&uid=$value[uid]" id="a_pm_$key" onclick="ajaxmenu(event, this.id, 1)">发短消息</a>
									<span class="pipe">|</span><a href="cp.php?ac=poke&op=send&uid=$value[uid]" id="a_poke_$key" onclick="ajaxmenu(event, this.id, 1)">打招呼</a>
								</p>

								<p><span class="gray">性别：</span><!--{if $value[sex]==2}-->美女<!--{elseif $value[sex]==1}-->帅哥<!--{else}-->保密<!--{/if}--></p>
								<!--{if $value[resideprovince] || $value[residecity]}-->
								<p><span class="gray">地区：</span><a href="cp.php?ac=friend&op=search&resideprovince=$value[resideprovince]&residecity=&searchmode=1">$value[resideprovince]</a> <a href="cp.php?ac=friend&op=search&resideprovince=$value[resideprovince]&residecity=$value[residecity]&searchmode=1">$value[residecity]</a></p>
								<!--{/if}-->
								<!--{if $value[note]}-->
								<p><span class="gray">状态：</span>$value[note]</p>
								<!--{/if}-->
								<!--{if $value[fellow]}-->
								<p><span class="gray">携带好友数：</span>$value[fellow]</p>
								<!--{/if}-->
								<!--{if $event[template] && $_SGLOBAL[supe_userevent][status]>=3}-->
								<p><!--{eval echo nl2br(getstr($value[template], 255, 1, 0))}--> </p>
								<!--{/if}-->
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<!--{/loop}-->
		</table>
		<!--{else}-->
		<div class="c_form">没有找到可浏览的成员信息。</div>
		<!--{/if}-->
	</div>

	<div class="page">$multi</div>


<!--{elseif $view=="pic"}-->

	<!--{if $picid}-->

		<!--{template space_pic}-->

	<!--{else}-->
		<div class="h_status">
			<div class="r_option">
			<!--{if $_SGLOBAL[supe_userevent][status] >= 3}-->
				<a href="cp.php?ac=event&op=pic&id=$eventid">照片管理</a>
			<!--{/if}-->
			<!--{if $event[grade]>0 && (($event[allowpic] && $_SGLOBAL[supe_userevent][status]>1) || $_SGLOBAL[supe_userevent][status]>=3)}-->
			<a href="cp.php?ac=upload&eventid=$eventid" class="submit">上传新照片</a>
			<!--{/if}-->
			</div>
			<span>活动相册 - 共 $piccount 张照片</span>
		</div>

		<!--{if $photolist}-->
		<table cellspacing="6" cellpadding="0" width="100%" class="photo_list">
			<tr>
			<!--{loop $photolist $key $value}-->
				<td>
					<a title="$value[title]" href="space.php?do=event&id=$eventid&view=pic&picid=$value[picid]">
						<img alt="$value[title]" src="$value[pic]"/>
					</a>
					<p>
						<span class="gray">来自</span> <a href="space.php?uid=$value[uid]" style="display:inline;width:auto;height:auto;">$_SN[$value[uid]]</a>
					</p>
				</td>
				<!--{if $key%4==3}--></tr><tr><!--{/if}-->
			<!--{/loop}-->
			</tr>
		</table>
		<div class="page">$multi</div>
		<!--{else}-->
		<div class="c_form">
			<p style="text-align: center">还没有活动照片<!--{if $event[grade]>0 && (($event[allowpic] && $_SGLOBAL[supe_userevent][status]>1) || $_SGLOBAL[supe_userevent][status]>=3)}-->，我来<a href="cp.php?ac=upload&eventid=$eventid">上传</a> <!--{/if}--></p>
		</div>
		<!--{/if}-->
	<!--{/if}-->

<!--{elseif $view == "thread"}-->
	<div class="m_box">
		<h2 class="h_status">
			<div class="r_option">
				<!--{if $_SGLOBAL[supe_userevent][status] >= 3}-->
				<a href="cp.php?ac=event&op=thread&id=$eventid">话题管理</a>
				<!--{/if}-->
				<!--{if $event[grade]>0 && $_SGLOBAL[supe_userevent][status]>=2}-->
				<a href="cp.php?ac=thread&tagid=$event[tagid]&eventid=$eventid" class="submit">发表新话题</a>
				<!--{/if}-->
			</div>
			话题
		</h2>
		<!--{if $threadlist}-->
		<div class="topic_list">
			<table cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<td class="subject">主题</td>
						<td class="author">作者 (回应/阅读)</td>
						<td class="lastpost">最后更新</td>
					</tr>
				</thead>
				<tbody>
					<!--{loop $threadlist $key $value}-->
						<!--{eval $magicegg = ""}-->
						<!--{eval if($value[magicegg]) for($i=0; $i<$value[magicegg]; $i++) $magicegg .= '<img src="image/magic/egg/'.mt_rand(1,6).'.gif" />';}-->
					<tr <!--{if $key%2==1}-->class="alt"<!--{/if}-->>
						<td class="subject">
						$magicegg
						<a href="space.php?uid=$value[uid]&do=thread&id=$value[tid]&eventid=$eventid" <!--{if $value[magiccolor]}--> class="magiccolor$value[magiccolor]"<!--{/if}-->>$value[subject]</a>
						</td>
						<td class="author"><a href="space.php?uid=$value[uid]">{$_SN[$value[uid]]}</a><br><em>$value[replynum]/$value[viewnum]</em></td>
						<td class="lastpost"><a href="space.php?uid=$value[lastauthorid]" title="{$_SN[$value[lastauthorid]]}">{$_SN[$value[lastauthorid]]}</a><br><!--{date('m-d H:i',$value[lastpost],1)}--></td>
					</tr>
					<!--{/loop}-->
				</tbody>
			</table>
		</div>
		<div class="page">$multi</div>
		<!--{else}-->
		<div class="c_form" style="text-align:center;">还没有相关话题。
			<!--{if $event[grade]>0 && $_SGLOBAL[supe_userevent][status]>=2}-->
			<a href="cp.php?ac=thread&tagid=$event[tagid]&eventid=$eventid">我来发表</a><!--{/if}-->
		</div>
		<!--{/if}-->
	</div>

<!--{elseif $view=="comment"}-->

	<div class="m_box">
		<div class="h_status">
			<span>活动留言</span>
		</div>
		<!--{if $event[grade]>0 && ($event[allowpost] || $_SGLOBAL[supe_userevent][status] > 1)}-->
		<div class="space_wall_post">
			<form action="cp.php?ac=comment" id="commentform_{$space[uid]}" name="commentform_{$space[uid]}" method="post">
				<a href="###" id="message_face" onclick="showFace(this.id, 'comment_message');return false;"><img src="image/facelist.gif" align="absmiddle" /></a>
				<!--{if $_SGLOBAL['magic']['doodle']}-->
				<a id="a_magic_doodle" href="magic.php?mid=doodle&showid=comment_doodle&target=comment_message" onclick="ajaxmenu(event, this.id, 1)"><img src="image/magic/doodle.small.gif" class="magicicon" />涂鸦板</a>
				<!--{/if}-->
				<br />
				<textarea name="message" id="comment_message" rows="5" cols="60" onkeydown="ctrlEnter(event, 'commentsubmit_btn');"></textarea>
				<input type="hidden" name="refer" value="space.php?do=event&id=$eventid" />
				<input type="hidden" name="id" value="$eventid" />
				<input type="hidden" name="idtype" value="eventid" />
				<input type="hidden" name="commentsubmit" value="true" />
				<br>
				<input type="button" id="commentsubmit_btn" name="commentsubmit_btn" class="submit" value="留言" onclick="ajaxpost('commentform_{$space[uid]}', 'wall_add')" />
				<span id="__commentform_{$space[uid]}"></span>
				<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
			</form>
		</div>
		<br>
		<!--{elseif $event[grade]>0}-->
		<textarea name="message" id="comment_message" rows="5" cols="60" readonly="">只有活动成员才能发布留言</textarea>
		<!--{/if}-->
		<!--{if $cid}-->
		<div class="notice">
			当前只显示与你操作相关的单个评论，<a href="space.php?do=event&id=$eventid&view=comment">点击此处查看全部评论</a>
		</div>
		<!--{/if}-->
		<div class="page">$multi</div>
		<div class="comments_list" id="comment">
			<input type="hidden" value="1" name="comment_prepend" id="comment_prepend" />
			<ul id="comment_ul">
			<!--{loop $comments $value}-->
				<!--{template space_comment_li}-->
			<!--{/loop}-->
			</ul>
		</div>
		<div class="page">$multi</div>
	</div>
	
	<script type="text/javascript">
	//彩虹炫
	var elems = selector('div[class~=magicflicker]'); 
	for(var i=0; i<elems.length; i++){
		magicColor(elems[i]);
	}
	</script>

<!--{else}-->

	<div id="content">
		<div class="m_box">
			<div class="event">

				<div class="event_icon">
						<a href="$event[pic]" target="_blank"><img class="poster_pre" src="$event[pic]" alt="$event[title]" onerror="this.src='$_SGLOBAL[eventclass][$event[classid]][poster]'"></a>
				</div>
				<div class="event_content">
					<dl>
						<dt class="gray">发起者:</dt>
						<dd><a href="space.php?uid=$event[uid]">{$_SN[$event[uid]]}</a></dd>
						<dt class="gray">活动类型:</dt>
						<dd>$_SGLOBAL[eventclass][$event[classid]][classname]</dd>
						<dt class="gray">活动地点:</dt>
						<dd>$event[province] $event[city] $event[location]</dd>
						<dt class="gray">活动时间:</dt>
						<dd><!--{eval echo sgmdate("m月d日 H:i", $event[starttime])}--> - <!--{eval echo sgmdate("m月d日 H:i", $event[endtime])}--></dd>
						<dt class="gray">截止报名:</dt>
						<dd>
							<!--{if $event[deadline]>=$_SGLOBAL[timestamp]}-->
							<!--{eval echo sgmdate("m月d日 H:i", $event[deadline])}-->
							<!--{else}-->
							报名结束
							<!--{/if}-->
						</dd>
						<dt class="gray">活动人数:</dt>
						<dd><!--{if $event[limitnum]}-->$event[limitnum] （还剩 <!--{eval echo $event[limitnum] - $event[membernum]}--> 个名额）<!--{else}-->不限<!--{/if}--></dd>
						<dt class="gray">需要审核:</dt>
						<dd><!--{if $event[verify] == 0}-->不<!--{/if}-->需要</dd>
					</dl>
					<ul>
						<li>$event[viewnum] 次查看</li>
						<li>$event[membernum] 人参加</li>
						<li>$event[follownum] 人关注</li>
						<!--{if $verifynum && $_SGLOBAL[supe_userevent][status]>=3}--><li><b><a href="cp.php?ac=event&id=$eventid&op=members&status=0">$verifynum</a></b> 人待审核</li><!--{/if}-->
					</ul>
					<p class="event_state">
					<!--{if $event[hot]}--><span class="hot"><em>热</em>$event[hot]</span><!--{/if}-->
					<!--{if !empty($_SGLOBAL['supe_userevent']) && $_SGLOBAL['supe_userevent']['status'] == 0 && $_SGLOBAL[timestamp]<$event[endtime]}-->
						您的报名正在审核中
					<!--{elseif $_SGLOBAL['supe_userevent']['status'] == 1}-->
						您关注了此活动
					<!--{elseif $_SGLOBAL['supe_userevent']['status'] >= 2}-->
						您参加了此活动
					<!--{/if}-->

					<!--{if $event[starttime] > $_SGLOBAL[timestamp]}-->
						<!--{if $countdown}-->
						距活动开始还有 $countdown 天
						<!--{else}-->
						活动今天开始
						<!--{/if}-->
					<!--{elseif $event[starttime] <= $_SGLOBAL[timestamp] && $event[endtime] >= $_SGLOBAL[timestamp]}-->
						此活动正在进行中
					<!--{else}-->
						活动已经结束
					<!--{/if}-->
					</p>
					<!--{if $event[grade]>0 && $_SGLOBAL[timestamp]<=$event[endtime]}-->
					<ul class="buttons">
						<!--{if empty($_SGLOBAL[supe_userevent]) && $event[deadline] > $_SGLOBAL[timestamp]}-->
							<!--{if $event['limitnum']==0 || $event['membernum']<$event['limitnum']}-->
						<li><a id="a_join" href="cp.php?ac=event&op=join&id=$eventid" onclick="ajaxmenu(event, this.id)" class="do_event_button">我要参加</a></li>
							<!--{/if}-->
						<li><a id="a_follow" href="cp.php?ac=event&op=follow&id=$eventid" onclick="ajaxmenu(event, this.id)" class="wish_event_button">我要关注</a></li>
						<!--{elseif !empty($_SGLOBAL[supe_userevent]) && $_SGLOBAL['supe_userevent']['status'] == 0}-->
							<!--{if $event[deadline] > $_SGLOBAL[timestamp] && ($event['template'] || $event['allowfellow'])}-->
						<li><a id="a_join" href="cp.php?ac=event&id=$eventid&op=join" onclick="ajaxmenu(event, this.id)" class="cancel_event_button">修改报名信息</a></li>
							<!--{/if}-->
						<li><a id="a_quit" href="cp.php?ac=event&id=$eventid&op=quit" onclick="ajaxmenu(event, this.id)" class="cancel_event_button">不参加了</a></li>
						<!--{elseif $_SGLOBAL['supe_userevent']['status'] == 1}-->
							<!--{if $event[deadline] > $_SGLOBAL[timestamp] && ($event['limitnum']==0 || $event['membernum']<$event['limitnum'])}-->
						<li><a id="a_join" href="cp.php?ac=event&op=join&id=$eventid" onclick="ajaxmenu(event, this.id)" class="do_event_button">我要参加</a></li>
							<!--{/if}-->
						<li><a id="a_cancelfollow" href="cp.php?ac=event&id=$eventid&op=cancelfollow" onclick="ajaxmenu(event, this.id)" class="cancel_event_button">取消关注</a></li>
						<!--{elseif $_SGLOBAL['supe_userevent']['status'] > 1}-->
							<!--{if $event[grade]>0 && $_SGLOBAL[timestamp]<= $event[deadline] && ($event[limitnum] <= 0 || $event[membernum] < $event[limitnum]) && ($_SGLOBAL[supe_userevent][status] >= 3 || $event[allowinvite])}-->
						<li><a href="cp.php?ac=event&id=$eventid&op=invite" class="recs_event_button">邀请好友</a></li>
							<!--{/if}-->
							<!--{if $_SGLOBAL[supe_uid] != $event[uid]}-->
						<li><a id="a_quit" href="cp.php?ac=event&id=$eventid&op=quit" onclick="ajaxmenu(event, this.id)" class="cancel_event_button">不参加了</a></li>
							<!--{/if}-->
						<!--{/if}-->
					</ul>
					<!--{/if}-->
				</div>
			</div>
		</div>

		<div class="m_box">
			<h3 class="feed_header">活动介绍</h3>
			<div class="event_article">
				$event[detail]
			</div>
		</div>

		<div class="m_box">
			<h3 class="feed_header">
			<div class="r_option"><a href="space.php?do=event&id=$eventid&view=member&status=2">全部</a></div>
			活动成员
			</h3>
			<!--{if $members}-->
			<ul class="avatar_list">
				<!--{loop $members $key $userevent}-->
				<li>
					<div class="avatar48"><a title="$_SN[$userevent[uid]]" href="space.php?uid=$userevent[uid]"><!--{avatar($userevent[uid])}--></a></div>
					<p>
						<a href="space.php?uid=$userevent[uid]">$_SN[$userevent[uid]]</a>
					</p>
					<!--{if $event[allowfellow]}-->
					<p><!--{if $userevent[fellow]}-->携带 $userevent[fellow] 人<!--{/if}--></p>
					<!--{/if}-->
				</li>
				<!--{/loop}-->
			</ul>
			<!--{else}-->
			<p style="text-align:center;">还没有活动成员。
			<!--{if $event[grade]>0 && $_SGLOBAL[timestamp]<= $event[deadline] && ($event[limitnum] <= 0 || $event[membernum] < $event[limitnum]) && ($_SGLOBAL[supe_userevent][status] >= 3 || ($event[allowinvite] && $_SGLOBAL[supe_userevent][status]==2))}-->
			<a href="cp.php?ac=event&id=$eventid&op=invite">邀请好友参加</a>
			<!--{/if}-->
			</p>
			<!--{/if}-->
		</div>

		<div class="m_box">
			<div class="ye_r_t"><div class="ye_l_t"><div class="ye_r_b"><div class="ye_l_b">
			<h2 class="atitle">
			<div class="r_option">
				<!--{if $event[grade]>0 && (($event[allowpic] && $_SGLOBAL[supe_userevent][status]>1) || $_SGLOBAL[supe_userevent][status]>=3)}-->
				<a href="cp.php?ac=upload&eventid=$eventid">上传</a> | <!--{/if}-->
				<a href="space.php?do=event&id=$eventid&view=pic">全部</a>
			</div>
			相册<!--{if $event[picnum]}--> <span style="font-weight:normal">(共 $event[picnum] 张照片)</span><!--{/if}-->
			</h2>
			<!--{if $photolist}-->
			<ul class="albs2">
				<!--{loop $photolist $key $value}-->
				<li>
					<a title="$value[title]" href="space.php?do=event&id=$eventid&view=pic&picid=$value[picid]">
					<img style="width: 75px; height: 75px;" alt="$value[title]" src="$value[pic]"/></a>
					<p style="text-align:left;">
						<span class="gray">来自</span> <a href="space.php?uid=$value[uid]" style="display:inline;width:auto;height:auto;">$_SN[$value[uid]]</a>
					</p>
				</li>
				<!--{/loop}-->
			</ul>
			<!--{else}-->
			<p class="event_albs_p">还没有活动照片。<!--{if $event[grade]>0 && (($event[allowpic] && $_SGLOBAL[supe_userevent][status]>1) || $_SGLOBAL[supe_userevent][status]>=3)}--><a href="cp.php?ac=upload&eventid=$eventid">我来上传</a> <!--{/if}--></p>
			<!--{/if}-->
			</div></div></div></div>
		</div>

		<!--{if $event[tagid]}-->
		<div class="m_box">
			<h2 class="feed_header">
				<div class="r_option">
					<!--{if $event[grade]>0 && $_SGLOBAL[supe_userevent][status]>=2}-->
					<a href="cp.php?ac=thread&tagid=$event[tagid]&eventid=$eventid">发表</a> | <!--{/if}-->
					<a href="space.php?do=event&id=$eventid&view=thread">全部</a>
				</div>
				话题<!--{if $event[threadnum]}--> <span style="font-weight:normal">(共 $event[threadnum] 个话题)</span><!--{/if}-->
			</h2>
			<!--{if $threadlist}-->
			<div class="topic_list">
				<table cellspacing="0" cellpadding="0">
					<thead>
						<tr>
							<td class="subject">主题</td>
							<td class="author">作者 (回应/阅读)</td>
							<td class="lastpost">最后更新</td>
						</tr>
					</thead>
					<tbody>
						<!--{loop $threadlist $key $value}-->
						<tr <!--{if $key%2==1}-->class="alt"<!--{/if}-->>
							<td class="subject">
							<a href="space.php?uid=$value[uid]&do=thread&id=$value[tid]&eventid=$eventid">$value[subject]</a>
							</td>
							<td class="author"><a href="space.php?uid=$value[uid]">{$_SN[$value[uid]]}</a><br><em>$value[replynum]/$value[viewnum]</em></td>
							<td class="lastpost"><a href="space.php?uid=$value[lastauthorid]" title="{$_SN[$value[lastauthorid]]}">{$_SN[$value[lastauthorid]]}</a><br><!--{date('m-d H:i',$value[lastpost],1)}--></td>
						</tr>
						<!--{/loop}-->
					</tbody>
				</table>
			</div>
			<!--{else}-->
			<div class="c_form" style="text-align:center;">还没有相关话题。
				<!--{if $event[grade]>0 && $_SGLOBAL[supe_userevent][status]>=2}-->
				<a href="cp.php?ac=thread&tagid=$event[tagid]&eventid=$eventid">我来发表</a><!--{/if}-->
			</div>
			<!--{/if}-->
		</div>
		<!--{/if}-->

		<div class="m_box">
			<h2 class="feed_header">
				<div class="r_option">
					<a href="space.php?do=event&id=$eventid&view=comment">全部</a>
				</div>
				留言
			</h2>
			<!--{if $event[grade]>0 && ($event[allowpost] || $_SGLOBAL[supe_userevent][status] > 1)}-->
			<div class="space_wall_post">
				<form action="cp.php?ac=comment" id="commentform_{$space[uid]}" name="commentform_{$space[uid]}" method="post">
					<a href="###" id="message_face" onclick="showFace(this.id, 'comment_message');return false;"><img src="image/facelist.gif" align="absmiddle" /></a>
					<!--{if $_SGLOBAL['magic']['doodle']}-->
					<a id="a_magic_doodle" href="magic.php?mid=doodle&showid=comment_doodle&target=comment_message" onclick="ajaxmenu(event, this.id, 1)"><img src="image/magic/doodle.small.gif" class="magicicon" />涂鸦板</a>
					<!--{/if}-->
					<br />
					<textarea name="message" id="comment_message" rows="5" cols="60" onkeydown="ctrlEnter(event, 'commentsubmit_btn');"></textarea>
					<input type="hidden" name="refer" value="space.php?do=event&id=$eventid" />
					<input type="hidden" name="id" value="$eventid" />
					<input type="hidden" name="idtype" value="eventid" />
					<input type="hidden" name="commentsubmit" value="true" />
					<br>
					<input type="button" id="commentsubmit_btn" name="commentsubmit_btn" class="submit" value="留言" onclick="ajaxpost('commentform_{$space[uid]}', 'wall_add')" />
					<span id="__commentform_{$space[uid]}"></span>
					<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
				</form>
			</div>
			<br>
			<!--{elseif $event[grade]>0}-->
			<textarea name="message" id="comment_message" rows="5" cols="60" readonly="">只有活动成员才能发布留言</textarea>
			<!--{/if}-->

			<div class="comments_list" id="comment">
				<input type="hidden" value="1" name="comment_prepend" id="comment_prepend" />
				<ul id="comment_ul">
				<!--{loop $comments $value}-->
					<!--{template space_comment_li}-->
				<!--{/loop}-->
				</ul>
				<!--{if $comments && count($comments) >= 20}-->
				<p><a href="space.php?do=event&id=$eventid&view=comment&page=2" style="float:right;">浏览更多留言</a></p>
				<!--{/if}-->
			</div>
		</div>

	</div>

	<div id="sidebar">

		<!--{if $topic}-->
		<div class="affiche">
			<img src="image/app/topic.gif" align="absmiddle">
			<strong>凑个热闹</strong>：<a href="space.php?do=topic&topicid=$topic[topicid]">$topic[subject]</a>
		</div>
		<!--{/if}-->

		<!--{if $_SGLOBAL[supe_userevent][status] > 1}-->
		<div class="sidebox">
			<h2 class="title">活动菜单</h2>
			<ul class="menu_list">
				<!--{if $_SGLOBAL[supe_userevent][status] >= 3}-->
					<!--{if $event[grade]>0 || $event[grade]==-2}-->
				<li><a href="cp.php?ac=event&id=$eventid&op=members">成员管理</a></li>
					<!--{/if}-->
				<li><a href="cp.php?ac=event&id=$eventid&op=edit">活动管理</a></li>
					<!--{if $event[grade]>0 || $event[grade]==-2}-->
				<li><a href="cp.php?ac=event&id=$eventid&op=pic">相册管理</a></li>
						<!--{if $event[tagid]}-->
				<li><a href="cp.php?ac=event&id=$eventid&op=thread">话题管理</a></li>
						<!--{/if}-->
					<!--{/if}-->
				<!--{/if}-->
				<!--{if $event[grade]>0 && $_SGLOBAL[timestamp]<= $event[deadline] && ($event[limitnum] <= 0 || $event[membernum] < $event[limitnum]) && ($_SGLOBAL[supe_userevent][status] >= 3 || $event[allowinvite])}-->
				<li><a href="cp.php?ac=event&id=$eventid&op=invite">邀请好友</a></li>
				<!--{/if}-->
				<!--{if $event[grade]>0 && $_SGLOBAL[timestamp]<= $event[deadline] && ($event[template] || $event[allowfellow])}-->
				<li><a id="a_join" href="cp.php?ac=event&id=$eventid&op=join" onclick="ajaxmenu(event, this.id)">报名信息</a></li>
				<!--{/if}-->
				<!--{if $_SGLOBAL[supe_userevent][status] >= 3 && $event[endtime] >= $_SGLOBAL[timestamp]}-->
				<li><a id="a_print" href="cp.php?ac=event&id=$eventid&op=print" onclick="ajaxmenu(event, this.id)">打签到表</a></li>
				<!--{/if}-->
				<!--{if $_SGLOBAL[supe_userevent][uid] == $event[uid]}-->
					<!--{if $event[grade]>0 && $_SGLOBAL[timestamp]>$event[endtime]}-->
				<li><a id="a_close" onclick="ajaxmenu(event, this.id)" href="cp.php?ac=event&id=$eventid&op=close">关闭活动</a></li>
					<!--{/if}-->
					<!--{if $event[grade]==-2 && $_SGLOBAL[timestamp]>$event[endtime]}-->
				<li><a id="a_open" onclick="ajaxmenu(event, this.id)" href="cp.php?ac=event&id=$eventid&op=open">开启活动</a></li>
					<!--{/if}-->
				<li><a id="a_delete" onclick="ajaxmenu(event, this.id)" href="cp.php?ac=event&id=$eventid&op=delete">取消活动</a></li>
				<!--{elseif $_SGLOBAL[endtime]<= $_SGLOBAL[timestamp]}-->
				<li><a id="a_quit2" onclick="ajaxmenu(event, this.id)" href="cp.php?ac=event&id=$eventid&op=quit">退出活动</a></li>
				<!--{/if}-->
			</ul>
		</div>
		<!--{/if}-->

		<div class="sidebox">
			<h2 class="title">
			组织者
			</h2>
			<ul class="avatar_list">
				<!--{loop $admins $key $userevent}-->
				<li>
					<div class="avatar48"><a title="$_SN[$userevent[uid]]" href="space.php?uid=$userevent[uid]"><!--{avatar($userevent[uid])}--></a></div>
					<p><a href="space.php?uid=$userevent[uid]">$_SN[$userevent[uid]]</a></p>
				</li>
				<!--{/loop}-->
			</ul>
		</div>

		<!--{if $follows}-->
		<div class="sidebox">
			<h2 class="title">
				<p class="r_option">
					<a href="space.php?do=event&id=$eventid&view=member&status=1">全部</a>
				</p>
				关注的人
			</h2>
			<ul class="avatar_list">
				<!--{loop $follows $key $userevent}-->
				<li>
					<div class="avatar48"><a title="$_SN[$userevent[uid]]" href="space.php?uid=$userevent[uid]"><!--{avatar($userevent[uid])}--></a></div>
					<p><a href="space.php?uid=$userevent[uid]">$_SN[$userevent[uid]]</a></p>
				</li>
				<!--{/loop}-->
			</ul>
		</div>
		<!--{/if}-->

		<!--{if !empty($relatedevents)}-->
		<div class="sidebox">
			<h2 class="title">
			参加这个活动的人也参加了
			</h2>
			<ul class="attention">
			<!--{loop $relatedevents $value}-->
			<li>
				<p>
					<a target="_blank" href="space.php?do=event&id=$value[eventid]">$value[title]</a>
				</p>
				<p class="gray" style="text-align: left">
					<!--{if $_SGLOBAL[timestamp] > $value[endtime]}-->
						已结束
					<!--{else}-->
						<!--{eval echo sgmdate("n月j日",$value[starttime])}-->
					<!--{/if}-->&nbsp;
					$value[membernum] 人参加 /
					$value[follownum] 人关注
				</p>
				<p>
					<!--{if $value[threadnum]}-->
					<a href="space.php?do=event&id=$value[eventid]&view=thread">
						$value[threadnum] 个话题
					</a> &nbsp;
					<!--{/if}-->
					<!--{if $value[picnum]}-->
					<a href="space.php?do=event&id=$value[eventid]&view=pic">
						$value[picnum] 张照片
					</a>
					<!--{/if}-->
				</p>
			</li>
			<!--{/loop}-->
			</ul>
		</div>
		<!--{/if}-->
	</div>
	
	<script type="text/javascript">
	//彩虹炫
	var elems = selector('div[class~=magicflicker]'); 
	for(var i=0; i<elems.length; i++){
		magicColor(elems[i]);
	}	
	</script>

<!--{/if}-->

<!--{template footer}-->